
package cn.com.pusai.common.listener;

import cn.com.pusai.common.util.SpringUtil;
import javax.servlet.ServletContextEvent;
import org.springframework.web.context.ContextLoaderListener;
import org.springframework.web.context.support.WebApplicationContextUtils;

public class SpringContextLoaderListener extends ContextLoaderListener
{

	public SpringContextLoaderListener()
	{
	}

	public void contextInitialized(ServletContextEvent event)
	{
		super.contextInitialized(event);
		javax.servlet.ServletContext context = event.getServletContext();
		org.springframework.context.ApplicationContext ctx = WebApplicationContextUtils.getRequiredWebApplicationContext(context);
		SpringUtil.setContext(ctx);
	}
}
